home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
G-Games
/
(c)gc.d64
/
driver.c
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
2KB
|
72 lines
1 PG$=" 6 4 - D R I V E R ":AU$="DONT HIT THE SIDES !":JF=1
2 POKE53280,0:POKE53281,0
90 GOTO62000
100 DIML$(9),L(3),B(25),P%(1000):GOSUB1000:POKE53280,0:POKE53281,0
110 POKEVIC,0:POKEVIC+23,0:POKEVIC+29,0:POKEVIC+27,000
115 N=19:PRINT"[147]":V=-46:W=0
120 Q=35:M=2:K=162:U=0:I=0:B=0
121 POKE2040,13:POKE53287,8
125 POKEVIC,K:POKEVIC+1,160
128 L$(1)="[169] / [146][169]":L$(3)="[157][223] [205] [223]":L$(2)=" [167] "
129 L$(4)="[169] / [146][169]":L$(6)="[157][223] [205] [223]":L$(5)=" [167] "
130 L$(7)="[169] / [146][169]":L$(9)="[157][223] [205] [223]":L$(8)=" [167] "
132 PRINT"[147]":FORN=1TO25:PRINTTAB(11)L$(2):NEXT:PRINT"";:N=11
133 POKEVIC+21,1
135 L(1)=-1:L(2)=0:L(3)=1
140 PRINTTAB(N)L$(M+I)
142 U=U+1:IFU=110THEN300
145 POKE53264,SGN(KAND256):POKE53248,KAND255
155 Q=Q+1:A=PEEK(56320):IFA=123THENK=K-8
156 IFPEEK(1622+K/8)=32THEN400
157 GETA$:IFA$="Q"THEN600
160 IFA=119THENK=K+8
175 IFRND(1)>.7THENM2=M:M=INT(RND(1)*3)+1
185 N1=N+L(M)
190 IFN1>27ORN1<4THENN1=N:M=2
195 N=N1:GOTO140
200 IFW=0THENW=1:V=-22:GOTO210
205 W=0:V=-46
210 POKE53287,W:POKE53287,W:RETURN
300 IFBTHEN500
302 IFI=6THENB=B+1:PRINT"";:U=100:GOTO145
305 IFM<>2THENU=109:GOTO145
310 N=N+1:U=0:M=2:I=I+3
320 GOTO145
400 FORN=1TO30:POKE53280,1:FORT=1TO10:NEXT:POKE53280,0:NEXT
410 POKE53269,0:PRINT"[147]YOU CRASHED!":GOTO545
500 FORN=1TO1000:NEXT:POKE53248+21,0
505 PRINT"[147]YOU FINISHED THE COURSE!"
545 PRINT:GOSUB9100 :PRINT"";:IF YNTHEN120
546 PRINT"[147]":END
550 TM=TI+10
560 IFTM>TITHEN560
570 RETURN
600 PRINT"[147]THANKS FOR PLAYING!":POKE53248,0:END
900 PRINTPEEK(56320):GOTO900
1000 READA:FORN=64*13TO64*14-3:READA:POKEN,A:NEXT:RETURN
9100 NO=0
9110 TM=0:SW=1
9115 PRINT"PLAY AGAIN? [151]YES NO[145]"
9120 IF TI<TMTHEN9150
9130 PRINTTAB(12+NO*4);MID$("[151]",SW,1);MID$("YESNO[160]",3*NO+1,3);"[145]"
9140 SW=3-SW:TM=TI+15
9150 JD=PEEK(JS)AND31:JB=(JD<16):JD=JDAND15
9160 IFJBANDJD=15THENYN=(NO=0):RETURN
9170 IF(JDAND8)=0ANDNO=0THENNO=1:GOTO9115
9180 IF(JDAND4)=0ANDNO=1THENNO=0:GOTO9115
9190 GOTO9120
50000 DATA62,0,0,0,71,255,226,239,60,247,254,24,127,253,255,191,237,193,183
50001 DATA237,128,183,205,255,243,13,128,112,15,255,240,15,255,240,15,255,240
50002 DATA15,255,240,239,255,240,255,255,247,255,255,255,255,255,255,247,255
50003 DATA127,243,190,239,1,255,128,0,127
61000 CRT=1024:VIC=53248:WD=40:CR$=CHR$(13):SID=54272:JS=56320:CM=55296
61010 QL=214:QI=254:RETURN
62000 GOSUB61000:POKEVIC+23,0:POKEVIC+33,0:LN=LEN(PG$):TB=(40-LN)/2
62010 PRINT"[147][158]"TAB(TB)LEFT$(" ",LN)
62020 PRINT""TAB(TB)PG$:PRINT""TAB(TB)LEFT$(" ",LN)
62030 PRINT""TAB((40-LEN(AU$))/2)AU$
62040 MS$="PRESS KEY TO BEGIN"
62060 PRINT"[159]"TAB(TB)MS$:PRINT"[159] "
62070 GETIN$:IFIN$=""THEN62070
62080 GOTO 100